<?php
	// Includes obligatorios
	include ('./dbconfig.php');
	include ('../Libraries/Tools/JLTools.class.php');
	
	// Objeto JLTools
	$jl = new JLTools();
	
	if(isset($_GET['id'])) $where = " WHERE tbl_users.int_id_user = '".$_GET['id']."'";
	
	$SQL = "SELECT 
	  tbl_users.int_id_user,
	  tbl_users.var_fullname,  
	  tbl_users.var_email,
	  tbl_users.var_username,
	  tbl_users.dat_modification,
	  tbl_typeusers.var_desc_typeuser,
	  tbl_sections.var_desc_section,
	  tbl_states.var_htmldesc,
	  tbl_states.var_state_description
	FROM
	  tbl_typeusers
	  INNER JOIN tbl_users ON (tbl_typeusers.int_id_typeuser = tbl_users.int_id_typeuser)
	  INNER JOIN tbl_sections ON (tbl_users.int_id_section = tbl_sections.int_id_section)
	  INNER JOIN tbl_states ON (tbl_users.int_id_state = tbl_states.int_id_state) ".$where;
	$campoId = "int_id_user";
 
	$jl->dataGridJSON( $cnn, $SQL, $campoId, true); 

	// Cerrar la coneccion obligatorio
	mysql_close($cnn); 
?>